package light3d;

//This point does not rotate itself around the origin, but instead keeps a record of its angle
public class PointWithAngle extends Point3D
{
	public PointWithAngle(double x, double y, double z)
	{
		super(x,y,z);
	}
	public void rotate(double x, double y, double z)
	{
		rX += x;
		rY += y;
		rZ += z;
	}
  public void setRotation(double x, double y, double z)
  {
    rX = x;
    rY = y;
    rZ = z;
  }
	public void moveForwards(double d)
	{	
    Point3D p = new Point3D(0, 0, 1);
    p.rotate(rX, rY, rZ);

		tempX += p.getX()*d;
		tempY += p.getY()*d;
		tempZ += p.getZ()*d;
	}
}
